﻿using TrueSync;

[System.Serializable]
public class ThrowHitState : StateBase//被投硬直状态
{
    public override StateEnum StateName
    {
        get
        {
            return StateEnum.ThrowHit; 
        }
    }

    public override void Excute(FP deltaTime)
    {
        if(IsFinished())
        {
            if(statusComponent.HP <= 0)
            {
                mLEntity.GetLogicComponent<LogicStateMachineComponent>().ChangeState(StateEnum.Dead);
                return;
            }

            if (statusComponent.Dizzy <= 0)
            {
                mLEntity.GetLogicComponent<LogicStateMachineComponent>().ChangeState(StateEnum.Dizzy);
                return;
            }

            mLEntity.GetLogicComponent<LogicStateMachineComponent>().ChangeState(StateEnum.Stand);
        }
    }

    public override void OnStimulate(Stimulate stimulate)
    {
    }
}
